home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 March / Macworld (1998-03) (Disk 1).dmg / Shareware World / Utilities / Text Processing / Alpha / Tcl / SystemCode / alphaMenus.tcl < prev    next >
Encoding:
Text File  |  1997-12-20  |  4.5 KB  |  228 lines  |  [TEXT/ALFA]

  1. ## -*-Tcl-*-
  2.  # ###################################################################
  3.  #  Alpha - new Tcl folder configuration
  4.  # 
  5.  #  FILE: "alphaMenus.tcl"
  6.  #                                    created: 21/9/97 {10:24:37 pm} 
  7.  #                                last update: 20/12/97 {7:17:45 pm} 
  8.  #  Author: Vince Darley
  9.  #  E-mail: <darley@fas.harvard.edu>
  10.  #    mail: Division of Engineering and Applied Sciences, Harvard University
  11.  #          Oxford Street, Cambridge MA 02138, USA
  12.  #     www: <http://www.fas.harvard.edu/~darley/>
  13.  #  
  14.  # Reorganisation carried out by Vince Darley with much help from Tom 
  15.  # Fetherston, Johan Linde and suggestions from the Alpha-D mailing list.  
  16.  # Alpha is shareware; please register with the author using the register 
  17.  # button in the about box.
  18.  #  
  19.  # Description:
  20.  # 
  21.  #  Initialises variables which contain the global menus.  If you 
  22.  #  use the smarterSource package, you can over-ride these quite
  23.  #  easily.  This file is sourced by the procedure 'menu::buildSome'
  24.  #  which handles menu building.
  25.  # ###################################################################
  26.  ##
  27. # ◊◊◊◊ File menu ◊◊◊◊ #
  28. set menu::items(File) {
  29.     "/Nnew"
  30.     "/Oopen…"
  31.     "<S/Wclose"
  32.     "<S<O<U/WcloseFloat"
  33.     "<S<I<O/WcloseAll"
  34.     "(-"
  35.     "<S/Ssave"
  36.     "<S<B<O/SsaveUnmodified"
  37.     "<S<I<O/SsaveAll"
  38.     "<SsaveACopyAs…"
  39.     "<S<UrenameTo…"
  40.     "<SsaveAs…"
  41.     "<E<SrevertToBackup"
  42.     "<Srevert"
  43.     "(-"
  44.     "<S/Y<Oshell"
  45.     "<S/Y<U<Ocalculator"
  46.     "<S/Y<B<OtoolserverShell"
  47.     "(-"
  48.     "pageSetup…"
  49.     "/P<Sprint…"
  50.     "(-"
  51.     "/Qquit"
  52. }
  53.  
  54. # ◊◊◊◊ Edit menu ◊◊◊◊ #
  55. set menu::items(Edit) {
  56.     "/Zundo"
  57.     "/Z<I<Oredo"
  58.     "/Lload"
  59.     "(-"
  60.     "/X<Scut"
  61.     "/C<Scopy"
  62.     "/V<Spaste"
  63.     "/A<SselectAll"
  64.     "/A<S<I<OselectParagraph"
  65.     "clear"
  66.     "(-"
  67.     "/`<Stwiddle"
  68.     "/`<S<I<OtwiddleWords" 
  69.     "(-" 
  70.     {/[<SshiftLeft} 
  71.     {/[<S<I<OshiftLeftSpace} 
  72.     {/]<SshiftRight} 
  73.     {/]<S<I<OshiftRightSpace} 
  74.     "/Bbalance" 
  75. }
  76.  
  77. # ◊◊◊◊ Text menu ◊◊◊◊ #
  78. set menu::items(Text) {
  79.     "/I<SfillParagraph"
  80.     "/I<S<O<IwrapParagraph"
  81.     "/I<S<O<I<UsentenceParagraph"
  82.     "/U<S<OfillRegion"
  83.     "/U<S<I<OwrapRegion"
  84.     "/U<S<O<I<UsentenceRegion"
  85.     "<E<SparagraphToLine"
  86.     "<SlineToParagraph"
  87.     "(-"
  88.     "<SreverseSort"
  89.     "<SsortLines"
  90.     "<S/L<O<IspellcheckWindow"
  91.     "<S/L<O<I<BspellcheckSelection"
  92.     "(-"
  93.     "zapInvisibles"
  94.     "<SspacesToTabs"
  95.     "<StabsToSpaces"
  96.     "<S<EindentRegion"
  97.     "<SindentLine"
  98.     "<E<SdowncaseRegion"
  99.     "<SupcaseRegion"
  100.     "(-"
  101.     {menu -n Strings {
  102.         "<SremovePrefix"
  103.         "<SinsertPrefix"
  104.         "<S<EremoveSuffix"
  105.         "<SinsertSuffix"
  106.         "setPrefix"
  107.         "setSuffix"
  108.         }}
  109.     "/D<ScommentLine"
  110.     "/D<S<I<OuncommentLine"
  111.     "<SuncommentBox"
  112.     "<ScommentBox"
  113.     "<S<EuncommentParagraph"
  114.     "<ScommentParagraph"
  115.     "(-"
  116.     "/K<I<OgotoFunc"
  117.     "/K<O<BgotoFileMark"
  118.     "/=markHilite"
  119.     {menu -n namedMarks -p namedMarkProc {
  120.         "/K<Oset…"
  121.         "goto…"
  122.         "remove…"
  123.         "(-"
  124.         "sort"
  125.         "sortByPosition"}}
  126.     {menu -n unnamedMarks -p unnamedMarkproc {
  127.         "set…"
  128.         "exchangePointAndMark"}}
  129. }
  130.  
  131. # ◊◊◊◊ Search menu ◊◊◊◊ #
  132. set menu::items(Search) {
  133.     "/F<Sfind…"
  134.     "/F<S<I<OsearchStart"
  135.     "/G<SfindAgain"
  136.     "/G<S<I<OfindAgainBackward"
  137.     "/MfindInNextFile"
  138.     "/E<SenterSearchString"
  139.     "/E<S<I<OenterReplaceString"
  140.     "(-"
  141.     "/S<S<BquickFind"
  142.     "/S<S<B<IquickFindRegexp"
  143.     "/R<BreverseQuickFind"
  144.     "(-"
  145.     "/Rreplace"
  146.     "/Hreplace&FindAgain"
  147.     "<S/R<O<IreplaceAll"
  148.     "<S/R<O<I<BreplaceInFileset"
  149.     "(-"
  150.     "/,<BpushPosition"
  151.     "/.<BpopPosition"
  152.     "/G<IgotoLine"
  153. }
  154. set menu::proc(Search) ""
  155.  
  156. # ◊◊◊◊ Utils menu ◊◊◊◊ #
  157. set menu::proc(fileUtils) menu::fileUtils
  158. set menu::proc(winUtils) menu::fileUtils
  159. set menu::items(fileUtils) {
  160.     "fileRemove…"
  161.     "fileInfo…"
  162.     "textToAlpha"
  163. }
  164. set menu::items(winUtils) {
  165.     "insertPathName…"
  166.     "insertFile…"
  167.     "wordCount"
  168. }
  169.  
  170. set menu::items(Utils) {
  171.     {menu -n fileUtils -p menu::fileUtils {}}
  172.     {menu -n winUtils -p menu::fileUtils {}}
  173.     {menu -n asciiEtc {
  174.         "quoteChar"
  175.         "(-"
  176.         "keyCode"
  177.         "keyAscii"
  178.         "getAscii"
  179.         "insertAscii"}
  180.     }
  181.     "(-"
  182.     "/M<I<OmatchingLines" 
  183.     "gotoMatch" 
  184.     "/M<BnextMatch"
  185.     "(-" 
  186.     "sendUrl"
  187.     "/jcmdDoubleClick"
  188. }
  189. set menu::proc(Utils) ""
  190. lappend menu::which_subs(Utils) "winUtils" "fileUtils"
  191.  
  192. # ◊◊◊◊ Config menu ◊◊◊◊ #
  193. set menu::items(Config) {
  194.     {menu -n "currentMode" -p mode::menuProc {}}
  195.     {menu -n global -p menu::generalProc {}}
  196.     "/p<UsuffixMappings…"
  197.     {menu -n "packages" -p package::menu {}}
  198.     {menu -m -n alphaDownloads -p remote::menu {}}
  199.     "helperApps…"
  200.     "(-"
  201.     "/kdescribeBinding"
  202.     "viewSavedSetting…"
  203.     "removeSavedSetting…"
  204.     "(-"
  205.     "/lsetFontsTabs…"
  206.     {menu -n redefineColors -p menu::colorProc {
  207.         foreground
  208.         background
  209.         "(-"
  210.         blue
  211.         cyan
  212.         green
  213.         magenta
  214.         red
  215.         white
  216.         yellow
  217.         "(-"
  218.         color_9
  219.         color_10
  220.         color_11
  221.         color_12
  222.         color_13
  223.         color_14
  224.         color_15}}
  225. }
  226. set menu::proc(Config) ""
  227. lappend menu::which_subs(Config) "global" "mode" packages alphaDownloads
  228.